using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Security.Principal;

namespace Adge.Web.UI
{
    public class Global : System.Web.HttpApplication
    {
        private log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);        
        
        protected void Application_Start(object sender, EventArgs e)
        {
            Castle.ActiveRecord.ActiveRecordStarter.Initialize(
                typeof(Adge.Models.NewsInfo).Assembly,
                new Castle.ActiveRecord.Framework.Config.XmlConfigurationSource(this.Server.MapPath("~/Configs/ar.config"))
                );            
        }

        protected void Application_End(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(Object sender, EventArgs e)
        {
        }

        protected void Application_EndRequest(Object sender, EventArgs e)
        {            
        }

        protected void Session_Start(Object sender, EventArgs e)
        {
            // Code that runs when a new session is started
            Session["PreviousButtonEnabled"] = false;
            Session["NextButtonEnabled"] = true;
            Session["YetAnotherPortal.net"] = true;
        }

        protected void Session_End(Object sender, EventArgs e)
        {
        }

        protected void Application_Error(object sender, EventArgs e)
        {
        }
    }
}